<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
	<block name="title">母版页</block>
</title>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/development-bundle/ui/jquery.ui.effect.js"></script>
<script src="__JS__/development-bundle/ui/jquery.ui.effect-clip.js"></script>
<script>
	function setRHigh() {
		var bodyh = document.documentElement.clientHeight;
		var bodyw = document.documentElement.clientWidth;
		document.getElementById("mainbody").style.height = (parseInt(bodyh) - 60) + 'px';
		document.getElementById("right_top").style.width = (parseInt(bodyw) - 210) + 'px';
		document.getElementById("list_title").style.width = (parseInt(bodyw) - 210) + 'px';
	}
	window.onload = window.onresize = function () {
		setRHigh();
	}
    $(document).ready(function() {
		var file_size = $("#spaceValue").val();
		if(file_size>=1024&&file_size<1048576){
			file_size=parseInt(file_size/1024);
			file_size=file_size+"KB";
		}
		else if(file_size>=1048576&&file_size<1073741824){
			file_size=parseInt(file_size/1048576);
			file_size=file_size+"MB";
		}
		else if(file_size>=1073741824){
			data[i].file_size=parseInt(data[i].file_size/1073741824);
			file_size=file_size+"GB";
		}
		else file_size=file_size+"B";
		$("#showSpace").html(file_size);
		$(".nav li").click(function() {
		$(".nav li").removeClass('over');
		$(this).addClass("over");
	})
	});
	$.get('{:U("Login/login")}', {loginname: loginname,passwd:passwd}, function(data) {
	//alert(data);
		if(data=="true")
			window.location.href='{:U("Index/index")}';
		else
		window.location.href='{:U("Index/index")}';
			//alert("用户名密码错误");
	});  
	
    function ajax(_url, _dataType, _data, _sync, operation) {
            try {
                $.ajax({
                    url: _url,
                    type: "POST",
                    dataType: _dataType,
                    data: _data,
                    async: _sync,
                    error: function(msg) {
                        //tipsWindown("text*异常"+msg);    
                    },
                    success: function(data)
                    {
                        operation(data);
                    }
                });
            } catch (error) {
                //tipsWindown("text*异常");
            }
        }
</script>
<block name="script">

</block>
<link rel="stylesheet" href="__CSS__/font-awesome.min.css" />
<link rel="stylesheet" href="__CSS__/common.css" />
<link rel="stylesheet" href="__CSS__/pure-min.css">
<link rel="stylesheet" href="__CSS__/bootstrap.css" />
<link rel="stylesheet" href="__CSS__/bootstrap-theme.css" />
<style>
.pure-button-secondary {
	background: rgb(66, 184, 221); /* this is a light blue */
}
.pure-button-xsmall {
	font-size: 100%;
}
.pure-button-secondary {
	color: white;
	border-radius: 4px;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
</style>
<block name="style">

</block>
</head>

<body>

<div class="main">
    <div class="top">
        <a href="{:U('Index/index')}"><div class="logo"></div></a>
        <!--<div class="title"><strong>网盘</strong></div>-->
        <div class="tool">
            <div class="search">
                <input type="text" id="search" name="search" value="搜索你的文件" onBlur="if(this.value==''){this.value='搜索你的文件';this.style.borderColor='#cccccc';this.style.color='#a0a0a0';}" onFocus="if(this.value=='搜索你的文件'){this.value='';this.style.borderColor='#AAAAAA';this.style.color='#2D2D2D';}" />
            </div>
            <div class="userinfo">
                <a href="#" id="uer_name">{$name}</a>
                <a href="#">客户端下载</a>
                <a href="#">通知</a>
                <a href="{:U('Login/logout')}">退出</a>
            </div>
        </div>
    </div>
<!-- pop-up box begin-->    
	<div class="modal fade" id="preview" role="dialog" aria-hidden="true" aria-labelledby="myModalLabel" style="width:100%">
        <div class="modal-dialog" style="width:60%;"> 
    		<div class="modal-content">
                <div class="modal-body">
          
                </div>
            </div>
     	</div>
    </div>
<!-- pop-up box end-->
    <div id="mainbody">
        <aside class="left_nav">
            <div class="nav">
                <ul>
                    <li id="allfile" class="choosed" onClick="window.location.href='{:U('Index/index')}'">全部文件</li>
                    <li id="pic" onClick="window.location.href='{:U('Pic/index')}'">图片</li>
                    <li id="doc" onClick="window.location.href='{:U('Doc/index')}'">文档</li>
                    <li id="mov" onClick="window.location.href='{:U('Mov/index')}'">视频</li>
                    <li id="bt" onClick="window.location.href='{:U('Bt/index')}'">种子</li>
                    <li id="musi" onClick="window.location.href='{:U('Musi/index')}'">音乐</li>
                    <li id="other" onClick="window.location.href='{:U('Other/index')}'">其他</li>
                    <p class="line"></p>
                    <li id="myshare" onClick="window.location.href='{:U('Share/index')}'">我的分享</li>
                    <p class="line"></p>
                    <li id="recycle" onClick="window.location.href='#'">回收站</li>
                </ul>
            </div>
            <div class="clientDownload">
                <span class="box pc"></span>
                <span class="box android"></span>
                <span class="box iphone"></span>
                <span class="client client_pc">PC</span>
                <span class="client client_android">Android</span>
                <span class="client client_iphone">Iphone</span>
            </div>
            <div class="footer">
            	<span style="margin:40px 5px 0 10px; float: left;">容量:</span>
            	<div class="capacity"><span></span>
                </div>
                <div class="use">
                    <input id="spaceValue" value="{$Think.session.space}" type="hidden"/>
                    <div id="showSpace"></div><div id="totalSpace">/1G</div>
                </div>
            </div>
        </aside>
    
    <div class="right_list">
        <div class="right_top" id="right_top">
            <button class="pure-button pure-button-secondary" onClick="window.location.href='{:U('Uploadify/Index')}'"><i class="icon-cog"></i>上传文件</button>
        </div>
        <table class="table table-hover" style="margin-top: 52px;">
            <thead>
                <tr id="list_title" valign="middle">
                    <th width="2%"><input type="checkbox" id="allcheked" onClick="checkall()"/></th>
                    <th width="70%" height="30px" id="select">文件夹</th>
                    <th width="13%">大小</th>
                    <th width="15%">修改日期</th>
                </tr> 
            </thead>
        </table>
         <div class="right_body">
        
            <block name="content">
            
            </block>
        </div>
    </div>
</div>
</div>
</body>
</html>